package cate.game.play.buff.h;

import cate.game.play.base.HpCfg;
import cate.game.play.buff.BuffHandler;
import cate.game.play.config.PlayCfgArgs;
import cate.game.play.proce.action.ctx.SkillActionCtx;

/**
 * 受到暴击时生效，每层造成6%*牛排最大生命值的伤害，最多6层，不可驱散
 */
public class 战吼BH extends BuffHandler {

	private HpCfg 血量配置;

	//血量配置=1:1:600:0:1:2:50000
	@Override
	public void parse(String code) {
		PlayCfgArgs args = new PlayCfgArgs(code);
		血量配置 = new HpCfg(args);
	}

	@Override
	public void afterSufferOneAttack(SkillActionCtx action, long totalDamage, boolean strike) {
		if(!strike){
			return;
		}
		buff.owner.attr.buffHurt(action, buff.caster, 血量配置.settle(buff.caster, buff.owner));
	}
}
